﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Sharp.DataTransferObject.CMS;
using Sharp.Platform.Mvc.Attribute;
using Sharp.Platform.Mvc.Models;

namespace Sharp.WebBooter.Areas.CMS.Models
{
    public class VIUViewModel : BaseViewModel
    {
        [HiddenInput]
        public Guid Id { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [Required, MaxLength(50), Display(Name = "标题", Prompt = "标题")]
        public string Title { get; set; }

        [Required, Display(Name = "文章内容"), DataType(DataType.MultilineText)]
        public string Content { get; set; }
        /// <summary>
        /// 栏目id
        /// </summary>
        [Display(Name = "栏目"), DisplayValueField("Name", "Id")]
        public Guid ColmunId { get; set; }
        public IList<ColumnDTO> Colmuns { get; set; }
        /// <summary>
        /// 分类
        /// </summary>
        public IEnumerable<object> Categories { get; set; }


        /// <summary>
        /// 领域
        /// </summary>
        public IEnumerable<object> Fields { get; set; }


        /// <summary>
        /// 临时记号
        /// </summary>
        public string TempFlag { get; set; }
        /// <summary>
        /// 评级
        /// </summary>
        [Display(Name = "评级"), DisplayValueField("Text", "Value")]
        public object[] Stars => new object[]
        {
            new  { Value=1,Text= " ★ "},
            new  { Value=2,Text= " ★★ "},
            new  { Value=3,Text= " ★★★ "},
            new  { Value=4,Text= " ★★★★ "},
            new  { Value=5,Text= " ★★★★★ "}
        };
    }
}